home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
ansi
/
hercsv20.zip
/
HERCSAVE.DOC
< prev
next >
Wrap
Text File
|
1989-07-10
|
13KB
|
281 lines
HERCSAVE 2.0
Hercules Graphics Card (tm) Screen Blanker
----------------------------------------------------------------------
(C) Copyright 1988,89 - Benjamin Diss/The Smart Solutions Group
Limited permission is granted to individual users for product
evaluation and testing. Continued use of this shareware program
requires registration as described later in this document.
All other rights are explicitly reserved by the author.
-- INTRODUCTION ------------------------------------------------------
Images that appear on a computer monitor for an extended period of
time may burn the display phosphors. This causes permanent damage to
the monitor and severely limits it's life span. After continual
damage the monitor eventually becomes useless.
To eliminate this problem, programs have been developed that observe
the computer system and blank the screen under certain conditions.
These programs install themselves in memory and monitor keyboard
activity. When there is no activity for a predetermined amount of
time, they blank the screen, assuming that the user has no immediate
need for it. These programs work fine for IBM compatible video
systems, however they do not work for Hercules video cards.
When Hercules designed the original monochrome graphics card, there
was no IBM standard to follow. It was not possible for Hercules to
build an IBM compatible monochrome graphics card. Therefore, the IBM
BIOS does not support the Hercules Graphics Card (HGC) and normal
screen blankers do not work properly.
HERCSAVE recognizes the limitations of the HGC. It does not rely on
any IBM BIOS or DOS functions. It programs the HGC's hardware
directly allowing it to safely blank and restore the screen in both
text and graphics modes.
-- SYNTAX ------------------------------------------------------------
HERCSAVE operates by monitoring the keyboard. After a specified
period of inactivity the program will blank the screen. Any keypress
will then restore it.
Syntax: HERCSAVE /Tseconds [options]
/t TIME before screen blanks in seconds. This option must be
specified to install the program as there is no default. To
disable time-out blanking specify zero by entering /T0.
/h HOT-KEY to force blank where:
1=Right Shift
2=Left Shift
4=CTRL
8=ALT
Select any combination of these toggle (shift) keys by adding
the desired codes together. The default is <ALT><Left Shift>
or /H10. To disable hot-key forced blanking specify zero by
entering /H0.
/o OPTIONAL retrace screen blanking method. The default method
is vertical size modification.
/u UNINSTALLS or removes the program from memory.
The TIME and HOT-KEY options may be changed after the program is
loaded. This allows the temporary disabling of HERCSAVE for
conflicting programs.
For example, "HERCSAVE /T300 /H3" would install HERCSAVE to blank
after about 5 minutes of keyboard inactivity, and would allow a forced
blank by pressing <LSHIFT><RSHIFT>. HERCSAVE would blank and restore
by modifying the vertical size register.
HERCSAVE is a well behaved resident program so it can be loaded in any
order with other resident programs. However, if you plan to uninstall
HERCSAVE it must be the last resident loaded that uses the keyboard
and timer interrupts.
HERCSAVE redirects only two interrupts and uses minimal memory by
releasing the environment space before going resident. Version 2.0
requires only 512 bytes of resident memory for the default blanking
method and 592 bytes for the optional retrace method.
-- COMPATIBILITY -----------------------------------------------------
Since HERCSAVE uses hardware instructions specific to the Hercules
Graphics Card, it tests for true compatibility. If it determines that
the active video card is not an HGC it tells you so and exits.
If the card responds correctly, HERCSAVE makes two more tests. These
tests ensure that the card will be able to properly report the video
mode. The program tests the responsiveness of the light pen
registers. HERCSAVE uses these registers to determine the number of
pixels currently being displayed. This number then indicates whether
the video mode is text or graphics.
If either of these two tests fails, HERCSAVE reports and error and
continues with the installation process. Be aware that if your card
doesn't support these registers, graphics mode programs may not
restore correctly.
-- TECHNICAL ---------------------------------------------------------
The screen can be blanked and restored using two methods. The default
is to set the vertical size to zero to blank and restore the size to
restore the screen. The optional method turns the retrace off to
blank and on to restore the screen.
- Vertical size blanking -
The vertical size method works best because it is simpler, more
reliable, and uses less resident memory than the retrace method.
To blank using the vertical size method, HERCSAVE tells the HGC
hardware to display the screen with zero lines. This makes the screen
appear blank. To restore, HERCSAVE determines if the video mode is
text or graphics. It then tells the HGC to display the screen with
the appropriate number of lines based on the current mode.
The only limitation to this method is that on some systems when the
screen blanks, the top row of pixels continues to be displayed. This
is a very minor flaw in the hardware of your card and is only a
cosmetic limitation.
- Retrace blanking -
The retrace method is more difficult. To blank the screen HERCSAVE
tells the HGC to turn off the light gun (in the monitor). This blanks
instantly, without leaving a line remaining at the top of the screen.
Restoring is much more complicated. To do this HERCSAVE first
determines the video mode. If the HGC is in graphics mode, it must
next determine the active video page.
It needs the active video page to properly set the Video Mode Control
Port. This port controls many of the hardware features of the HGC.
Unfortunately, it is limited to "write only" and cannot be "read"
from. Therefore, the active video page must be determined by some
other method.
Fortunately, Microsoft has established a solution with its mouse
driver. Graphics based programs that support a Microsoft compatible
mouse must update the Video BIOS Data Area when they change to
graphics mode. This allows the mouse driver to determine the active
video page so that it may display the mouse pointer. Since it is not
possible to determine the active video page any other way, HERCSAVE
checks this area and uses the value it finds.
It then calculates the proper Video Mode Control Byte and sends it to
the port to turn the light gun on.
If, when attempting to restore in graphics mode, the screen appears in
random blocks and shapes it can be assumed that your application does
not update the Video BIOS Data Area. If this is the case with your
system, it probably would be best to use the vertical blanking method.
- Vintage equipment -
Early in 1983, when Hercules first released their monochrome graphics
card, s